//
// Created by xiaoma on 1/31/21.
//

#ifndef HORSE_VM_INTERPRETER_H
#define HORSE_VM_INTERPRETER_H

#include "../code/CodeObject.h"
#include "../code/ByteCode.h"
#include "../object/HiInteger.h"
#include "../object/HiObject.h"
#include "source/object/Universe.h"
#include "../util/Map.h"

#define PUSH(x) _stack->add((x))
#define POP() _stack->pop()

class Interpreter {
public:
    void run(const CodeObject* codes);

private:
    ArrayList<HiObject*>* _stack = nullptr;
    const ArrayList<HiObject*>* _consts = nullptr;
};

#endif //HORSE_VM_INTERPRETER_H
